1. Field of the Invention
The present invention relates generally to data transfer and, more particularly, to systems and methods for balancing traffic bandwidth.
2. Description of Related Art
Systems often use high speed interfaces to transfer data. One example of a high speed interface is PL4. PL4, short for “POS-PHY L4,” is an interface specification developed by an industry consortium. PL4 is designed to transfer data between a physical layer (PHY) device and a link layer device at aggregate bandwidths of OC-192 Asynchronous Transfer Mode (ATM) and Packet over SONET/SOH (POS), as well as 10 gigabit per second Ethernet. System Packet Interface Level 4 (SPI4) is another example of an industry bus substantially similar to PL4.
More particularly, PL4 is a burst-oriented interface that receives 2 bytes of control signal(s) and a fixed maximum amount of data (e.g., 64 bytes, 128 bytes, 32 bytes, etc.). The PL4 interface may be considered a maximum transfer size-based interface because for each transfer by a PL4 interface, the PL4 interface outputs data of some maximum transfer (burst) size. The PL4 interface uses a protocol that requires all data bursts, except for end-of-packet bursts, to be multiples of 16 bytes.
The PL4 interface is not a fixed time slot interface, resulting in efficient use of system bandwidth. For example, congested streams can use unused bandwidth of other idle streams.
FIG. 1 is a data flow diagram of a transfer by a conventional PL4 interface. The data transfer includes a data signal and a control signal. The data signal may include a control frame or one or more data frames. If a packet includes more than 64 bytes of data (e.g., 512 bytes), the PL4 interface sends the data in bursts (e.g., 64 byte bursts) within the data frames. The control signal identifies whether the data signal includes a control frame or a data frame.
A control frame contains start of packet (SOP), end of packet (EOP), start of burst (SOB), and end of burst (EOB) information. EOP/SOP, EOB/SOB, and EOP/idle can occur in the same control frame.
The control frame may also include a stream number that identifies the stream to which the data signal and control signal correspond. For a single stream routing system, the stream number is zero. In this case, the single stream is allocated the full bandwidth.
In a multi-stream routing system, the PL4 interface typically processes one burst per stream and then repeats. Ideally, each of the streams makes full use of its allocated bandwidth. Situations arise, however, where one or more streams use less than their allocated bandwidth. The worst case is the scenario where one stream contains an odd packet size (e.g., 65 bytes) while the rest of the streams contain multiples of the maximum burst size (e.g., 64 bytes). In this scenario, the odd-packet-size stream could lose some of its allocated bandwidth.
FIG. 2 is a diagram of an example data flow that illustrates a scenario in which one stream loses some of its allocated bandwidth. For this example, assume that the system includes a PL4 interface that receives 16 streams and has a maximum burst size of 64 bytes. Assume further that stream 0 includes 65-byte packets and streams 1–15 include 64-byte packets.
Suppose that the PL4 interface includes a simple round robin scheduler that schedules one burst for transmission for each of the streams and then repeats. During the first round of transmissions, the PL4 interface transmits 64 bytes of packet data for each of streams 0–15. During the next round, stream 0 has one byte left of the 65 bytes of packet data. In this case, the PL4 interface transmits a single byte of packet data for stream 0 followed by an EOP/SOP stream 1 control signal and 64 bytes of packet data for stream 1. As a result, stream 0 loses much of its allocated bandwidth (approximately 50%) because of the EOP burst. Stream 0 may simply lose its fair share of bandwidth in this case.
Table 1 further illustrates this problem for cases where stream 0 contains differing packet sizes.
TABLE 1Packet SizeUtilized Bandwidth (Mbs) forfor StreamPL4 bus at 700 MHz - designUtilization (%) for PL4 bus0 (Bytes)goal: 622 Mbsat 700 MHz16177.825.417188.526.919210.330.033360.251.563668.295.565355.150.7391490.968.1129465.1670.3257551.678.8513608.578.8In the example above where stream 0 includes 65-byte packets, stream 0's EOP 1-byte burst creates a tremendous performance hit. As shown from Table 1, stream 0 loses approximately 50% of its allocated bandwidth.
This problem is particularly troublesome on the egress path of the routing system (i.e., the path leading from the routing system to the vendor, or outside, system; as opposed to the ingress path leading from the vendor/outside system to the routing system). The ingress path has high bandwidth buses into the system with a lot of buffering and, thus, underrun is not an issue. The egress path, however, does not allow underruns or any gaps in the middle of a packet to be sent outside of the system.
Therefore, there is a need for an interface for PL4 or similar buses that optimizes use of stream bandwidth without shutting off traffic in the middle of a packet.